package com.example.huangbei.log;

import android.util.Log;

/**
 * Created by huangbei on 2017/9/5.
 */

public class Task implements Runnable , Cloneable{

    private String name;

    public Task(){
        Log.i("Task","执行了构造函数");
    }

    public void setName(String name){
        this.name = name;
    }

    @Override
    public void run() {
        Log.i("Task",name);
    }

    @Override
    protected Object clone() throws CloneNotSupportedException {
        Task task = null;
        try{
            task = (Task) super.clone();
        }catch (Exception e) {
            e.printStackTrace();
        }
        return task;
    }
}
